package com.huawei;

import java.util.Arrays;
import java.util.Scanner;



//不能用set，因为不能去重
public class HJ014 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int firstInput = scanner.nextInt();

        String[] strArr = new String[firstInput];
        for (int i = 0; i < firstInput; i++) {
            strArr[i]=scanner.next();
        }
        //默认就是按字典顺序排序
        Arrays.sort(strArr);
        for (String str:strArr){
            System.out.println(str);
        }

    }
}
